home *** CD-ROM | disk | FTP | other *** search
/ Belgian Amiga Club - ADF Collection / BS1 part 26.zip / BS1 part 26 / Aztec C v5.2a disk 4.adf / 204inc_i.lzh / graphics / text.i < prev    next >
Text File  |  1991-03-14  |  6KB  |  152 lines

  1.     IFND    GRAPHICS_TEXT_I
  2. GRAPHICS_TEXT_I    SET    1
  3. **
  4. **    $Filename: graphics/text.i $
  5. **    $Release: 2.04 $
  6. **    $Revision: 37.0 $
  7. **    $Date: 91/01/07 $
  8. **
  9. **    graphics library text structures
  10. **
  11. **    (C) Copyright 1985,1986,1987,1988,1989 Commodore-Amiga, Inc.
  12. **        All Rights Reserved
  13. **
  14.  
  15.     IFND    EXEC_PORTS_I
  16.     INCLUDE    "exec/ports.i"
  17.     ENDC    ; EXEC_PORTS_I
  18.  
  19.     IFND    UTILITY_TAGITEM_I
  20.     INCLUDE    "utility/tagitem.i"
  21.     ENDC    ; UTILITY_TAGITEM_I
  22.  
  23. *------ Font Styles --------------------------------------------------
  24. FS_NORMAL    EQU    0    ; normal text (no style attributes set)
  25.     BITDEF  FS,UNDERLINED,0    ; underlined (under baseline)
  26.     BITDEF  FS,BOLD,1        ; bold face text (ORed w/ shifted right 1)
  27.     BITDEF  FS,ITALIC,2        ; italic (slanted 1:2 right)
  28.     BITDEF  FS,EXTENDED,3    ; extended face (must be designed)
  29.  
  30.     BITDEF  FS,COLORFONT,6    ; this uses ColorTextFont structure
  31.     BITDEF  FS,TAGGED,7        ; the TextAttr is really an TTextAttr,
  32.  
  33. *------ Font Flags ---------------------------------------------------
  34.     BITDEF  FP,ROMFONT,0    ; font is in rom
  35.     BITDEF  FP,DISKFONT,1    ; font is from diskfont.library
  36.     BITDEF  FP,REVPATH,2    ; designed path is reversed (e.g. left)
  37.     BITDEF  FP,TALLDOT,3    ; designed for hires non-interlaced
  38.     BITDEF  FP,WIDEDOT,4    ; designed for lores interlaced
  39.     BITDEF  FP,PROPORTIONAL,5    ; character sizes vary from tf_XSize
  40.     BITDEF  FP,DESIGNED,6    ; size is "designed", not constructed
  41. *                ; note: if you do not set this bit in your
  42. *                ; textattr, then a font may be constructed
  43. *                ; for you by scaling an existing rom or disk
  44. *                ; font (under V36 and above).
  45.     ;-- bit 7 is always clear for fonts on the graphics font list
  46.     BITDEF  FP,REMOVED,7    ; the font has been removed
  47.  
  48.  
  49. ******* TextAttr node ************************************************
  50.  STRUCTURE  TextAttr,0
  51.     APTR    ta_Name        ; name of the desired font
  52.     UWORD   ta_YSize        ; height of the desired font
  53.     UBYTE   ta_Style        ; desired font style
  54.     UBYTE   ta_Flags        ; font preferences flags
  55.     LABEL   ta_SIZEOF
  56.  
  57.  STRUCTURE  TTextAttr,0
  58.     APTR    tta_Name        ; name of the desired font
  59.     UWORD   tta_YSize        ; height of the desired font
  60.     UBYTE   tta_Style        ; desired font style
  61.     UBYTE   tta_Flags        ; font preferences flags
  62.     APTR    tta_Tags        ; extended attributes
  63.     LABEL   tta_SIZEOF
  64.  
  65. ******* Text Tags ****************************************************
  66. TA_DeviceDPI    EQU    1!TAG_USER    ; Tag value is Point union:
  67.                     ; Hi word XDPI, Lo word YDPI
  68.  
  69.  
  70. MAXFONTMATCHWEIGHT    EQU    32767    ; perfect match from WeighTAMatch
  71.  
  72.  
  73. ******* TextFont node ************************************************
  74.  STRUCTURE    TextFont,MN_SIZE ; reply message for font removal
  75.                 ; font name in LN_NAME    \ used in this
  76.     UWORD   tf_YSize        ; font height        | order to best
  77.     UBYTE   tf_Style        ; font style        | match a font
  78.     UBYTE   tf_Flags        ; preference attributes    / request.
  79.     UWORD   tf_XSize        ; nominal font width
  80.     UWORD   tf_Baseline        ; distance from the top of char to baseline
  81.     UWORD   tf_BoldSmear    ; smear to affect a bold enhancement
  82.  
  83.     UWORD   tf_Accessors    ; access count
  84.  
  85.     UBYTE   tf_LoChar        ; the first character described here
  86.     UBYTE   tf_HiChar        ; the last character described here
  87.     APTR    tf_CharData        ; the bit character data
  88.  
  89.     UWORD   tf_Modulo        ; the row modulo for the strike font data
  90.     APTR    tf_CharLoc        ; ptr to location data for the strike font
  91.                 ;   2 words: bit offset then size
  92.     APTR    tf_CharSpace    ; ptr to words of proportional spacing data
  93.     APTR    tf_CharKern        ; ptr to words of kerning data
  94.     LABEL   tf_SIZEOF
  95.  
  96. tf_Extension    EQU    MN_REPLYPORT
  97.  
  98. ;------    tfe_Flags0 (partial definition) ------------------------------
  99.     BITDEF  TE0,NOREMFONT,0    ; disallow RemFont for this font
  100.  
  101.  STRUCTURE    TextFontExtension,0    ; this structure is read-only
  102.     UWORD   tfe_MatchWord    ; a magic cookie for the extension
  103.     UBYTE   tfe_Flags0        ; (system private flags)
  104.     UBYTE   tfe_Flags1        ; (system private flags)
  105.     APTR    tfe_BackPtr        ; validation of compilation
  106.     APTR    tfe_OrigReplyPort    ; original value in tf_Extension
  107.     APTR    tfe_Tags        ; Text Tags for the font
  108.     APTR    tfe_OFontPatchS    ; (system private use)
  109.     APTR    tfe_OFontPatchK    ; (system private use)
  110.     ; this space is reserved for future expansion
  111.     LABEL   tfe_SIZEOF        ; (but allocated only by the system)
  112.  
  113.  
  114. *******    ColorTextFont node *******************************************
  115. ;------    ctf_Flags ----------------------------------------------------
  116. CT_COLORFONT    EQU    $0001    ; color map contains designer's colors
  117. CT_GREYFONT    EQU    $0002    ; color map describes even-stepped brightnesses
  118.                 ; from low to high
  119. CT_ANTIALIAS    EQU    $0004    ; zero background thru fully saturated char
  120.  
  121.     BITDEF    CT,MAPCOLOR,0    ; map ctf_FgColor to the rp_FgPen if the former
  122.                 ; is a valid color within ctf_Low..ctf_High
  123.  
  124. ;------ ColorFontColors ----------------------------------------------
  125.  STRUCTURE    ColorFontColors,0
  126.     UWORD   cfc_Reserved    ; must be zero
  127.     UWORD   cfc_Count        ; number of entries in cfc_ColorTable
  128.     APTR    cfc_ColorTable    ; 4 bit per component color map packed xRGB
  129.     LABEL   cfc_SIZEOF
  130.  
  131. ;------    ColorTextFont ------------------------------------------------
  132.  STRUCTURE    ColorTextFont,tf_SIZEOF
  133.     UWORD   ctf_Flags        ; extended flags
  134.     UBYTE   ctf_Depth        ; number of bit planes
  135.     UBYTE   ctf_FgColor        ; color that is remapped to FgPen
  136.     UBYTE   ctf_Low        ; lowest color represented here
  137.     UBYTE   ctf_High        ; highest color represented here
  138.     UBYTE   ctf_PlanePick    ; PlanePick ala Images
  139.     UBYTE   ctf_PlaneOnOff    ; PlaneOnOff ala Images
  140.     APTR    ctf_ColorFontColors    ; struct ColorFontColors * for font
  141.     STRUCT  ctf_CharData,8*4    ; pointers to bit planes ala tf_CharData
  142.     LABEL   ctf_SIZEOF
  143.  
  144. ******* TextExtent node **********************************************
  145.  STRUCTURE    TextExtent,0
  146.     UWORD   te_Width        ; same as TextLength
  147.     UWORD   te_Height        ; same as tf_YSize
  148.     STRUCT  te_Extent,8        ; WORD MinX, MinY, MaxX, MaxY relative to CP
  149.     LABEL   te_SIZEOF
  150.  
  151.     ENDC    ; GRAPHICS_TEXT_I
  152.